<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/12/22
  Time: 22:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    //用户注销会话，session ID 会变
//    session.invalidate();
    //移出会话的属性，来实现注销功能 session ID 不会变
    session.removeAttribute("userName");
    response.sendRedirect(request.getContextPath()+"/index.jsp");
%>
</body>
</html>
